home *** CD-ROM | disk | FTP | other *** search
- # Jedi Knight Cog Script
- #
- # ACTOR_SD.COG
- #
- # ACTOR Script - Sentry Droid
- #
- # [CR]
- #
- #
- # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
- #
- # ========================================================================================
-
- symbols
-
- message killed
- message skill
- message damaged
-
- template powerup=+dbattery local
- template explosion=+sentry_exp local
- thing newThing local
- flex damageAmount local
- flex damageType local
- flex totalDamage local
- int player local
-
-
- end
-
- # ========================================================================================
-
- code
-
- killed:
- return;
-
- # ........................................................................................
-
- skill:
- ReturnEx(-1);
- return;
-
- # ........................................................................................
-
- damaged:
- damageAmount = GetParam(0);
- damageType = GetParam(1);
-
- totalDamage = damageAmount;
-
- if (BitTest(damageType, 0x01))
- {
- totalDamage = damageamount * 0.50;
- }
-
- player = GetLocalPlayerThing();
-
- if(GetThingParent(GetSourceRef()) == player)
- {
- if (GetCurWeapon(player) == 1)
- {
- if (GetThingHealth(player) > 1)
- {
- DamageThing(player, 1, 0x1, player);
- }
- }
- }
-
- ReturnEx(totalDamage);
- return;
-
-
- end
-
-